import React, { FC } from 'react';
import { Iknow } from '../utils/know';
import moment from 'moment';
import "../utils/font_1hsfvuvglv9/iconfont.css"
import "./know.less"
import Thetime from "../store/modules/index"
interface Iitem {
  item: Iknow;
}
const Knowledge: FC<Iitem> = (props) => {
  let item = props.item;

  let allTimes = Thetime(item.publishAt as string | number);
 
  return (
    <div className="knowz">
      <div className="top">
        <h2>{item.title}</h2>
        <span>{allTimes}</span>
      </div>
      <dl>
        <dt>
          <img src={item.cover} alt="" />
        </dt>
        <dd>
          <p>{item.summary}</p>
          <p>
            <span> <i className="iconfont icon-kanguo"></i> {item.views}</span>
            <span> <i className="iconfont icon-fenxiang"></i> 分享</span>
          </p>
        </dd>
      </dl>
    </div>
  );
};

export default Knowledge;
